// ******************************************************************
// * Copyright(c)  Steven Lu
// * Description   : Entity_INV_PROD_INVENTORY_ITEM
// * CreateDate    : 2014-06-05 18:30:11
// * Creater       : CodeSmith
// * LastChangeDate: 2014-06-05 18:30:11
// * LastChanger   : 2014-06-05 18:30:11
// * Version Info  : 1.0 For ESOL
// ******************************************************************

using System;
using System.Data;
using System.Collections.Generic;
using System.Text;
using System.Runtime.Serialization;
using Suzsoft.Smart.EntityCore;
using ESOL.Common.Schema;
using ESOL.Common;

namespace ESOL.Common.Entity
{
    [DataContract]
	[Serializable]
	public partial class InvProdInventoryItemEntity : EntityBase
    {
        public InvProdInventoryItemTable TableSchema
        {
            get
            {
                return InvProdInventoryItemTable.Current;
            }
		}
		
		public InvProdInventoryItemEntity()
        {

        }
		
		public InvProdInventoryItemEntity(DataRow dr)
        {
			if(dr == null)
			{
				return;
			}
			this.Id = Convert.ToString(CommonFunctions.ToObject(dr["ID"]));
			this.InvId = Convert.ToString(CommonFunctions.ToObject(dr["INV_ID"]));
			this.InvNo = Convert.ToString(CommonFunctions.ToObject(dr["INV_NO"]));
			this.ProdSn = Convert.ToString(CommonFunctions.ToObject(dr["PROD_SN"]));
			this.ProdQty = Convert.ToInt32(CommonFunctions.ToObject(dr["PROD_QTY"]));
			this.Unit = Convert.ToString(CommonFunctions.ToObject(dr["UNIT"]));
			this.CurTechnicNo = Convert.ToString(CommonFunctions.ToObject(dr["CUR_TECHNIC_NO"]));
			this.TechnicItemId = Convert.ToString(CommonFunctions.ToObject(dr["TECHNIC_ITEM_ID"]));
			this.CurWorkgroupNo = Convert.ToString(CommonFunctions.ToObject(dr["CUR_WORKGROUP_NO"]));
			this.CurAssetCode = Convert.ToString(CommonFunctions.ToObject(dr["CUR_ASSET_CODE"]));
			this.CurTechnicName = Convert.ToString(CommonFunctions.ToObject(dr["CUR_TECHNIC_NAME"]));
			this.CurWorkgroupName = Convert.ToString(CommonFunctions.ToObject(dr["CUR_WORKGROUP_NAME"]));
        }
		
		public InvProdInventoryItemEntity(DataRowView dr)
        {
			if(dr == null)
			{
				return;
			}
			this.Id = Convert.ToString(CommonFunctions.ToObject(dr["ID"]));
			this.InvId = Convert.ToString(CommonFunctions.ToObject(dr["INV_ID"]));
			this.InvNo = Convert.ToString(CommonFunctions.ToObject(dr["INV_NO"]));
			this.ProdSn = Convert.ToString(CommonFunctions.ToObject(dr["PROD_SN"]));
			this.ProdQty = Convert.ToInt32(CommonFunctions.ToObject(dr["PROD_QTY"]));
			this.Unit = Convert.ToString(CommonFunctions.ToObject(dr["UNIT"]));
			this.CurTechnicNo = Convert.ToString(CommonFunctions.ToObject(dr["CUR_TECHNIC_NO"]));
			this.TechnicItemId = Convert.ToString(CommonFunctions.ToObject(dr["TECHNIC_ITEM_ID"]));
			this.CurWorkgroupNo = Convert.ToString(CommonFunctions.ToObject(dr["CUR_WORKGROUP_NO"]));
			this.CurAssetCode = Convert.ToString(CommonFunctions.ToObject(dr["CUR_ASSET_CODE"]));
			this.CurTechnicName = Convert.ToString(CommonFunctions.ToObject(dr["CUR_TECHNIC_NAME"]));
			this.CurWorkgroupName = Convert.ToString(CommonFunctions.ToObject(dr["CUR_WORKGROUP_NAME"]));
        }

        public override TableInfo OringTableSchema
        {
            get
            {
                return InvProdInventoryItemTable.Current;
            }
        }
		
		#region Perporty List
        [DataMember]
        public string Id
        {
            get { return Convert.ToString(GetData(InvProdInventoryItemTable.C_ID)); }
            set { SetData(InvProdInventoryItemTable.C_ID, value); }
        }
		
        [DataMember]
        public string InvId
        {
            get { return Convert.ToString(GetData(InvProdInventoryItemTable.C_INV_ID)); }
            set { SetData(InvProdInventoryItemTable.C_INV_ID, value); }
        }
		
        [DataMember]
        public string InvNo
        {
            get { return Convert.ToString(GetData(InvProdInventoryItemTable.C_INV_NO)); }
            set { SetData(InvProdInventoryItemTable.C_INV_NO, value); }
        }
		
        [DataMember]
        public string ProdSn
        {
            get { return Convert.ToString(GetData(InvProdInventoryItemTable.C_PROD_SN)); }
            set { SetData(InvProdInventoryItemTable.C_PROD_SN, value); }
        }
		
        [DataMember]
        public int ProdQty
        {
            get { return Convert.ToInt32(GetData(InvProdInventoryItemTable.C_PROD_QTY)); }
            set { SetData(InvProdInventoryItemTable.C_PROD_QTY, value); }
        }
		
        [DataMember]
        public string Unit
        {
            get { return Convert.ToString(GetData(InvProdInventoryItemTable.C_UNIT)); }
            set { SetData(InvProdInventoryItemTable.C_UNIT, value); }
        }
		
        [DataMember]
        public string CurTechnicNo
        {
            get { return Convert.ToString(GetData(InvProdInventoryItemTable.C_CUR_TECHNIC_NO)); }
            set { SetData(InvProdInventoryItemTable.C_CUR_TECHNIC_NO, value); }
        }
		
        [DataMember]
        public string TechnicItemId
        {
            get { return Convert.ToString(GetData(InvProdInventoryItemTable.C_TECHNIC_ITEM_ID)); }
            set { SetData(InvProdInventoryItemTable.C_TECHNIC_ITEM_ID, value); }
        }
		
        [DataMember]
        public string CurWorkgroupNo
        {
            get { return Convert.ToString(GetData(InvProdInventoryItemTable.C_CUR_WORKGROUP_NO)); }
            set { SetData(InvProdInventoryItemTable.C_CUR_WORKGROUP_NO, value); }
        }
		
        [DataMember]
        public string CurAssetCode
        {
            get { return Convert.ToString(GetData(InvProdInventoryItemTable.C_CUR_ASSET_CODE)); }
            set { SetData(InvProdInventoryItemTable.C_CUR_ASSET_CODE, value); }
        }
		
        [DataMember]
        public string CurTechnicName
        {
            get { return Convert.ToString(GetData(InvProdInventoryItemTable.C_CUR_TECHNIC_NAME)); }
            set { SetData(InvProdInventoryItemTable.C_CUR_TECHNIC_NAME, value); }
        }
		
        [DataMember]
        public string CurWorkgroupName
        {
            get { return Convert.ToString(GetData(InvProdInventoryItemTable.C_CUR_WORKGROUP_NAME)); }
            set { SetData(InvProdInventoryItemTable.C_CUR_WORKGROUP_NAME, value); }
        }
		
		#endregion
	}
	
	
}	

